package com.punai.standard.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.punai.standard.domain.StaClChapter;
import com.punai.standard.domain.template.StaClChapterExcel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 材料章节Mapper接口
 *
 * @author zhx
 * @date 2022-12-21
 */
public interface StaClChapterMapper extends BaseMapper<StaClChapter>
{
    /**
     * 查询材料章节
     *
     * @param id 材料章节主键
     * @return 材料章节
     */
    public StaClChapter selectStaClChapterById(@Param("versionId")String versionId,@Param("id") String id);

    /**
     * 查询材料章节列表
     *
     * @param staClChapter 材料章节
     * @return 材料章节集合
     */
    public List<StaClChapter> selectStaClChapterList(StaClChapter staClChapter);

    List<StaClChapterExcel> selectExport(@Param("versionId") String versionId);


    /**
     * 删除材料章节
     *
     * @param id 材料章节主键
     * @return 结果
     */
    public int deleteStaClChapterById(String id);

    /**
     * 批量删除材料章节
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteStaClChapterByIds(String[] ids);

    public List<StaClChapter> queryContrast(@Param("versionId")String versionId,@Param("ids") String[] ids);

    List<String> selectChildrenIdById(@Param("id") String id, @Param("versionId")String versionId);
}
